<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends MY_Controller {
	function __construct(){
		parent::__construct();
		$this->load->model('page_model');
		$this->load->model('article_model');
		$this->load->model('gallery_model');
		$this->load->model('coltypes_model');
	}
  // public function index()
  // {
  //   $vdata['header'] =array(
  //     'title'=> $this->mcfg->get_config('site','title_seo')
  //     ,'tags'=> $this->mcfg->get_config('site','tags')
  //     ,'intro' => $this->mcfg->get_config('site','intro')
  //   );
  //
  //   # 在使用控制器时输出CI共模板使用
  //   $vdata['CI'] =& $this;
  //
  //   $this->load->view('welcome',$vdata);
  // }
  public function index(){
  	$data['banner']=$this->gallery_model->get_gallery($cid=9);
  	$data['title_suf']=$this->db->get_where('configs',array('id'=>4))->row_array();
  	$data['seo']['title_suf']=1;
  	
  	$data['title']=$this->db->get_where('configs',array('id'=>5))->row_array();
  	$data['seo']['title_seo']=$data['title']['value'];
  	
  	$data['keyw']=$this->db->get_where('configs',array('id'=>6))->row_array();
  	$data['seo']['tags']=$data['keyw']['value'];
  	
  	$data['desc']=$this->db->get_where('configs',array('id'=>7))->row_array();
  	$data['seo']['intro']=$data['desc']['value'];
  	$this->load->view('welcome',$data);
  }

}
